package creational.abstractfactory;

public class AbstractFactoryTest {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		ContinentFactory factory;
		factory = AmericaFactory.getInstance();
		AnimalWorld aw1 = new AnimalWorld(factory);
		System.out.println("in " + factory.getClass().getSimpleName());
		aw1.RunFoodChain();
		factory = new AfricaFactory();
		AnimalWorld aw2 = new AnimalWorld(factory);
		System.out.println("in " + factory.getClass().getSimpleName());
		aw2.RunFoodChain();
	}

}
